﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SD.Entities
{
    public class ReferenceData
    {
        public string RefId;
        public string RefCode;
        public string RefValue;

        public override bool Equals(Object obj)
        {
            // If parameter is null return false.
            if (obj == null)
            {
                return false;
            }

            // If parameter cannot be cast to Point return false.
            ReferenceData p = obj as ReferenceData;
            if ((Object)p == null)
            {
                return false;
            }

            // Return true if the fields match:
            return string.Equals(RefId, p.RefId) && 
                string.Equals(RefCode, p.RefCode) && 
                string.Equals(RefValue, p.RefValue);
        }

        public bool Equals(ReferenceData p)
        {
            // If parameter is null return false:
            if ((object)p == null)
            {
                return false;
            }

            // Return true if the fields match:
            return string.Equals(RefId, p.RefId) &&
                string.Equals(RefCode, p.RefCode) &&
                string.Equals(RefValue, p.RefValue);
        }
    }
}
